package drds.server.config.model;

/**
 * 
 */
public class TableRule {
	private String name;
	private final ShardRule shardRule;

	public TableRule(String name, ShardRule shardRule) {
		if (name == null) {
			throw new IllegalArgumentException("name is null");
		}
		if (shardRule == null) {
			throw new IllegalArgumentException("no rule is found");
		}
		this.name = name;
		this.shardRule = shardRule;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public ShardRule getShardRule() {
		return shardRule;
	}

}
